package com.asman.vr.dto

import androidx.annotation.Keep
import java.io.Serializable


/**
 * @author ybk
 * @date :2020-01-13 14:17
 * @desc:
 */

//每个tab应该保留的数据是 ----->>>

//外层
//step0---外层获取基本信息+  backInfo: BackInfo

//tab层
//step1---获取当前tab的空间列表  summarySpaceList   接口1

//step2---根据当前空间列表，获取每一个空间下的商品列表  接口2
//val backList: List<Back> 最后合集   没加载一次缓存起来

@Keep
data class GoodsDecorateDataUpdate(
//    val area: String? = null,
//    val backInfo: BackInfo? = null,//各个tab的信息
//    val backList: List<Back>? = arrayListOf(),//各个空间对应的硬装，软装，电气的商品列表
//    val materialList: List<MaterialInfo>? = null,//各个空间对应的人工辅材商品列表
//    val balconyNum: Int? = null,
    val bathroomNum: Int? = null,
    val bedroomNum: Int? = null,
    val buildingName: String? = null,
//    val city: String? = null,
    val count: Int? = null,
//    val discount: Int? = null,
//    val discountStr: String? = null,
//    val earnestMoney: String? = null,
//    val houseName: String? = null,
    val kitchenNum: Int? = null,
    val livingRoomNum: Int? = null,
    val payment: Int? = null,
//    val paymentStr: String? = null,
//    val schemeMainImgUrl: String? = null,
//    val schemePrice: Int? = null,
    val style: String? = null,
    val type: Int? = null
//    val workDays: Int? = null
)

@Keep
data class GoodsDecorateData(
    val area: String? = null,
    var backInfo: BackInfo? = null,//各个tab的信息
    val summarySpaceList: List<SummarySpace>? = null,//空间列表
    val backList: List<Back>? = arrayListOf(),//各个空间对应的硬装，软装，电气的商品列表
    val materialList: List<MaterialInfo>? = null,//各个空间对应的人工辅材商品列表
//    val balconyNum: Int? = null,
    val bathroomNum: Int? = null,
    val bedroomNum: Int? = null,
    val buildingName: String? = null,
    val city: String? = null,
    val count: Int? = null,
//    val discount: Int? = null,
//    val discountStr: String? = null,
//    val earnestMoney: String? = null,
//    val houseName: String? = null,
    val kitchenNum: Int? = null,
    val livingRoomNum: Int? = null,
    var payment: Int? = null,
//    val paymentStr: String? = null,
    val schemeMainImgUrl: String? = null,
    val schemePrice: Int? = null,
    val style: String? = null,
    val type: Int? = null,
    val workDays: Int? = null
)

//各个tab的信息
@Keep
data class BackInfo(
    val accessory: Accessory? = null,//人工辅材
    var electrical: Electrical? = null,//电气设备
    val hard: Hard? = null,//硬装主材
    var soft: Soft? = null//软装家具
) {
    //人工辅材
    @Keep
    data class Accessory(
        val count: Int? = null,
//        val discountFeeFen: Int? = null,
//        val discountStr: String? = null,
        val payment: Int? = null
//        val paymentStr: String? = null
    )

    //电气设备
    @Keep
    data class Electrical(
        val count: Int? = null,
//        val discountFeeFen: Int? = null,
//        val discountStr: String? = null,
        val payment: Int? = null
//        val paymentStr: String? = null
    )

    //硬装主材
    @Keep
    data class Hard(
        val count: Int? = null,
//        val discountFeeFen: Int? = null,
//        val discountStr: String? = null,
        val payment: Int? = null
//        val paymentStr: String? = null
    )

    //软装家具
    @Keep
    data class Soft(
        val count: Int? = null,
//        val discountFeeFen: Int? = null,
//        val discountStr: String? = null,
        val payment: Int? = null
//        val paymentStr: String? = null
    )
}

//每个空间的信息
@Keep
data class SummarySpace(
    val count: Int? = null,
    val payment: Int? = null,
//    val paymentStr: String? = null,
    val spaceCode: String? = null,
    val spaceName: String? = null
)

//人工辅材空间ListData
@Keep
data class MaterialInfo(
    val count: Int? = null,
//    val discount: Any? = null,
//    val discountStr: String? = null,
    val list: List<MaterialGood>? = null,//人工辅材当前空间下所有的商品列表
    val payment: Long? = null,
//    val paymentStr: String? = null,
//    val spaceCode: String? = null,
    val spaceName: String? = null
//    val spaceSize: Int? = null
) {
    //人工辅材商品Data
    @Keep
    data class MaterialGood(
        val code: String? = null,
        val feeDetail: List<FeeDetail>? = null,
        val name: String? = null,
        val orderFee: Long? = null,
//        val orderFeeStr: String? = null,
        val projectQuantity: String? = null,
        val unitName: String? = null
    ) : Serializable

    //人工辅材当前商品的明细
    @Keep
    data class FeeDetail(
        val name: String? = null,
        val orderFee: Long? = null,
        val price: Long? = null
//        val priceStr: String? = null,
//        val projectQuantity: String? = null,
//        val unitName: String? = null
    ) : Serializable
}

//空间和当前空间的商品列表
@Keep
data class Back(
    val count: Long? = null,
//    val discount: Long? = null,
//    val discountStr: String? = null,
    var list: List<Good>? = null,//商品列表
    val payment: Long? = null,
//    val paymentStr: String? = null,
    val spaceCode: String? = null,
    val spaceName: String? = null
//    val spaceSize: Int? = null//todo 这个无用字段去掉
) {

    @Keep
    data class Good(
//        val attributes: Any? = null,
//        val brandName: String? = null,
//        val debugData: Any? = null,
        val disabled: Boolean? = null,//是否下架
        val disabledDesc: String? = null,
//        val discountFeeFen: Int? = null,
        val exactNumber: String? = null,
//        val feeLine: Any? = null,
//        val goodsFeeStr: String? = null,
//        val goodsId: Long? = null,
        val img: String? = null,
        val logisticsfee: Int? = null,
//        val logisticsfeeStr: String? = null,
        val name: String? = null,
        val number: String? = null,
        val optionalStatus: Int? = null,//可选状态 0：不可选 1: 可选 2：不可取消
        val payment: Long? = null,
        val price: Long? = null,
//        val priceStr: String? = null,
//        val quantity: String? = null,
        val quantityUnit: String? = null,
//        val sellStatus: Int? = null,
//        val sendStatus: Any? = null,
        val setupfee: Long? = null,
//        val setupfeeStr: String? = null,
        val skuId: Long? = null,
        val subtitle: String? = null,
        val tagPrice: Long? = null,
//        val tagPriceStr: String? = null,
        var check: Boolean? = null//是否选中 --- native 变量
    )
}
